% Author    : Jeffrey O'Dell 
% Summary   : Compiles all the p_pod source as mex files.
% TODO      : Put our toys in their correct place?

% Assumes you're running this from the same, correct directory.
% Paired with clean_mex.m

%mcc -x filter_params.m
%mcc -x acq_params.m
% ??? mcc -x make_skp.m
%mcc -x get_fname.m
%mcc -x batch_params.m
%mcc -x p_pod.m
%mcc -x avg_params.m
%mcc -x make_evt_params.m


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% We need the path to P_Pod.  Don't forget the trailing '\'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

path = pwd;
disp('Cleaning...')
clean_mex
disp('Compiling... ');

mcc -x -d b_norm -A debugline:on b_norm\b_norm.m
dos(['move b_norm\*.dll ' path]);

% These 3 -> e_avg
mcc -x -d e_avg -A debugline:on e_avg\e_avg.m
mcc -x -A debugline:on -d e_avg e_avg\e_sum.m
mcc -x -d e_avg -A debugline:on e_avg\e_zero.m
dos(['move e_avg\*.dll ' path]);
% --

mcc -x -d e_fft -A debugline:on e_fft\e_fft.m
dos(['move e_fft\*.dll ' path]);
mcc -x -d e_filt -A debugline:on e_filt\e_filt.m
dos(['move e_filt\*.dll ' path]);
mcc -x -d e_o3d -A debugline:on e_o3d\e_o3d.m
dos(['move e_o3d\*.dll ' path]);
mcc -x -A debugline:on -d e_pulse e_pulse\e_pulse.m
dos(['move e_pulse\*.dll ' path]);

disp('Done.');